package com.cl.security.system.controller;

import com.cl.security.common.result.CommonResult;
import com.cl.security.system.entity.RegisterEmail;
import com.cl.security.system.service.RegisterEmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/registerEmail")
public class RegisterEmailController {
    @Autowired
    RegisterEmailService registerEmailService;

    @PostMapping("/send")
    public CommonResult send(RegisterEmail registerEmail) {
        return registerEmailService.send(registerEmail);
    }
    @GetMapping("/exam")
    public CommonResult exam(RegisterEmail registerEmail) {
        return registerEmailService.exam(registerEmail);
    }
}
